#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include "sequential_list.h"

int main()
{
    List L = (List)malloc(sizeof(struct LNode));
    L->Last = -1;

    int elements_count;
    printf("How many elements to insert ?\n");
    scanf(" %d", &elements_count);
    InsertMany(L, elements_count);
    Traverse(L);

    return 0;
}

void FindLongestIncreaseSublist(List L)
{
    int diff_list[L->Last], diff_list_sum = 0, diff_list_sum_prev = 0, increasing_sublist_left = 0, increasing_sublist_right = 0;
    for (int i = 0; i < L->Last; i++) {
        diff_list[i] = L->Data[i + 1] - L->Data[i];
        if (diff_list[i] > 0)
            diff_list_sum++;
        else {
            diff_list_sum_prev = (diff_list_sum_prev > diff_list_sum) ? diff_list_sum_prev : diff_list_sum;
            diff_list_sum = 0;
        }
    }
}
